.class final Lorg/microemu/cldc/file/FileSystemFileConnection$15;
.super Ljava/lang/Object;
.source "FileSystemFileConnection.java"

# interfaces
.implements Ljava/security/PrivilegedExceptionAction;


# instance fields
.field private final this$0:Lorg/microemu/cldc/file/FileSystemFileConnection;

.field private final val$newName:Ljava/lang/String;


# direct methods
.method constructor <init>(Lorg/microemu/cldc/file/FileSystemFileConnection;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 494
    iput-object p1, p0, Lorg/microemu/cldc/file/FileSystemFileConnection$15;->this$0:Lorg/microemu/cldc/file/FileSystemFileConnection;

    iput-object p2, p0, Lorg/microemu/cldc/file/FileSystemFileConnection$15;->val$newName:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()Ljava/lang/Object;
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 496
    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lorg/microemu/cldc/file/FileSystemFileConnection$15;->this$0:Lorg/microemu/cldc/file/FileSystemFileConnection;

    invoke-static {v1}, Lorg/microemu/cldc/file/FileSystemFileConnection;->access$200(Lorg/microemu/cldc/file/FileSystemFileConnection;)Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v1

    iget-object v2, p0, Lorg/microemu/cldc/file/FileSystemFileConnection$15;->val$newName:Ljava/lang/String;

    invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 497
    .local v0, newFile:Ljava/io/File;
    iget-object v1, p0, Lorg/microemu/cldc/file/FileSystemFileConnection$15;->this$0:Lorg/microemu/cldc/file/FileSystemFileConnection;

    invoke-static {v1}, Lorg/microemu/cldc/file/FileSystemFileConnection;->access$200(Lorg/microemu/cldc/file/FileSystemFileConnection;)Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/io/File;->renameTo(Ljava/io/File;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 498
    new-instance v1, Ljava/io/IOException;

    new-instance v2, Ljava/lang/StringBuffer;

    invoke-direct {v2}, Ljava/lang/StringBuffer;-><init>()V

    const-string v3, "Unable to rename "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    iget-object v3, p0, Lorg/microemu/cldc/file/FileSystemFileConnection$15;->this$0:Lorg/microemu/cldc/file/FileSystemFileConnection;

    invoke-static {v3}, Lorg/microemu/cldc/file/FileSystemFileConnection;->access$200(Lorg/microemu/cldc/file/FileSystemFileConnection;)Ljava/io/File;

    move-result-object v3

    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    const-string v3, " to "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 501
    :cond_0
    const/4 v1, 0x0

    return-object v1
.end method
